﻿using hyjx.comm.Types;
using S7.Net;

namespace Hyjx.MixerService.Configs
{
    /// <summary>
    /// 设备 PLC 配置
    /// </summary>
    public class DevicePlcConfig
    {
        /// <summary>
        /// IP 地址
        /// </summary>
        public string Ip { get; set; } = string.Empty;
        /// <summary>
        /// 机架
        /// </summary>
        public short Rack { get; set; }
        /// <summary>
        /// 插槽
        /// </summary>
        public short Slot { get; set; }
        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnabled { get; set; }
        /// <summary>
        /// CPU 类型
        /// </summary>
        public CpuType CpuType { get; set; }
        /// <summary>
        /// PLC 功用类型
        /// </summary>
        public PlcFeatureTypes? FeatureType { get; set; }
        /// <summary>
        /// 控制的设备
        /// </summary>
        public string ControlDevice { get; set; } = string.Empty;
        /// <summary>
        /// MES模式点地址
        /// </summary>
        public string? MesMode { get; set; }
        /// <summary>
        /// 工步完成MES校验信号
        /// </summary>
        public string? StepSignal { get; set; }
        public string DeviceName { get; set; } = string.Empty;
    }
}
